package com.example.practice2023.service;

import com.example.practice2023.mapper.RotationMapper;
import com.example.practice2023.pojo.Rotation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RotationService {

    @Autowired
    private RotationMapper rotationMapper;

    public void addRotation(Rotation rotation) {
        rotationMapper.addRotation(rotation);
    }

    public void deleteRotation(int id) {
        rotationMapper.deleteRotation(id);
    }

    public void updateRotation(Rotation rotation) {
        rotationMapper.updateRotation(rotation);
    }

    public List<Rotation> getRotations() {
        return rotationMapper.getRotations();
    }

    public Rotation getRotationById(int id) {
        return rotationMapper.getRotationById(id);
    }


    public void deleteMultipleRotations(List<Integer> ids) {
        rotationMapper.deleteMultipleRotations(ids);
    }

}
